﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using QDT.Core.Assignments;
using QDT.Core.Deals;
using QDT.Core.Projects;

namespace QDT.Web.Models
{
    public class AgreementModel
    {
        public Project Project { get; set; }
        public ICollection<Credit> Credits { get; set; }
        public ProjectAgency Agency { get; set; }

        public AgreementModel(Project project, ICollection<Credit> credits)
        {
            Project = project;
            Credits = credits;
        }
    }

    public class AssignAgreementModel
    {
        public Assignment Assignment { get; set; }
        public Credit Pcredit { get; set; }
        public Credit Credit { get; set; }

        public AssignAgreementModel(Assignment assignment, Credit pcredit, Credit credit)
        {
            Assignment = assignment;
            Pcredit = pcredit;
            Credit = credit;
        }
    }

    public class AssignBidModel
    {
        public int AssginId { get; set; }
        public decimal Money { get; set; }
        public decimal PayEarning { get; set; }
        public decimal PayDiscount { get; set; }
        public decimal BuyMoney { get { return Money - PayDiscount + PayEarning; } }
    }

}